<?php


class BasicProcessor  extends WeModuleProcessor {
    
	public function respond() {

		$rid = $this->rule_id;

		$where = array('rule_id'=>array('in',$rid));
		$reply = M('BasicReply')->where($where)->order("Rand()")->find();
	
		$reply['content'] = htmlspecialchars_decode($reply['content']);
		//过滤HTML
		$reply['content'] = str_replace(array('<br>', '&nbsp;'), array("\n", ' '), $reply['content']);
		$reply['content'] = strip_tags($reply['content'], '<a>');
		
		return $this->respText($reply['content']);
        
	}
}